const citys = require('../static/city')
const City = require('../db/model/CityModel')
const { to } = require('await-to-js')
const {sleep} = require('./index')

citys.forEach(async (city, index) => {
    let [err, result] = await to(City.insertMany(city))
    if(err) return console.log(err)

    if(index % 20 === 0){
        console.log(index)
        await sleep(500)
    }
})


    


    